#!/bin/bash
if [ $# -lt 2 ]; then
    echo "Usage: $0 [hanzi-list] [wordlst-file]"
    exit 1
fi

hanzilst=$1
wordlst=$2
cat /dev/null > ${wordlst}
while read line
do
  #echo -e "\nbaidu dict request for \"$line\""
  for i in `seq ${#line}`
  do
    python3 req-baidu.py ${line:$(($i-1)):1}
  done
done<${hanzilst}
